from flaskr import create_app
from flaskr.models import db

app = create_app()


def init_db():
    """Clear existing data and create new tables."""
    with app.app_context():
        db.create_all()


if __name__ == '__main__':
    init_db()
    app.run(debug=True, host="0.0.0.0")
